package com.goodboys.base.service;

import com.goodboys.base.entity.Page;

import java.util.List;

/**
 * Created by CJ on 2018-05-19.
 */
public interface BaseService<T> {

    //添加单个对象
    public int insert(T entity) throws Exception;

    //修改单个对象
    public int update(T entity) throws Exception;

    //删除单个对象
    public int deleteById(String id) throws Exception;

    //查询单个对象
    public T selectById(T entity) throws Exception;

    //查询所有数据
    public List<T> selectAll() throws Exception;


    //通过关键字分页查询
    public Page<T> selectPage(Page<T> page) throws Exception;

    //通过多条件分页查询
    public Page<T> selectPageUseDyc(Page<T> page) throws Exception;
}
